<!--
描述：人员管理-教师维护组件
开发人：sunlf
开发日期：2017年8月17日
-->

<template lang="pug">
    keep-alive
        kalix-table(bizKey="teacher" title='教师列表' v-bind:targetURL="targetURL" v-bind:bizDialog="bizDialog"
        v-bind:bizSearch="'AdminTeacherSearch'" v-bind:btnList="btnList"
        v-bind:dictDefine="dictDefine" v-bind:isFixedColumn="isFixedColumn")
            template(slot="tableColumnSlot")
                el-table-column(prop="beOnExternal" label="教师类别" align="center" width="180px")
                    template(slot-scope="scope")
                        el-tag(v-if="scope.row.beOnExternal * 1 === 0") 教师教辅人员
                        el-tag(v-else type="success") 外聘教师
                el-table-column(prop="orgName" label="所在单位部门" align="center" width="200px")
                kalix-date-column(prop="entranceYear" label="入校/启聘年份" align="center" width="150px")
                el-table-column(prop="code" label="工号" align="center" width="100px")
                el-table-column(prop="name" label="姓名" align="center" width="100px")
                el-table-column(prop="sexName" label="性别" align="center" width="80px")
                el-table-column(prop="birthday" label="出生日期" align="center" width="100px")
                el-table-column(prop="nation" label="民族" align="center" width="100px")
                el-table-column(prop="placeOfOrigin" label="籍贯" align="center" width="100px")
                el-table-column(prop="address" label="现住址" align="center" width="100px")
                el-table-column(prop="education" label="学历" align="center" width="100px")
                el-table-column(prop="degree" label="学位" align="center" width="150px")
                el-table-column(prop="positionalTitlesName" label="职称" align="center" width="150px")
                el-table-column(prop="positionName" label="岗位" align="center" width="150px")
                el-table-column(prop="phone" label="联系电话" align="center" width="150px")
                el-table-column(prop="mobile" label="手机" align="center" width="150px")
                el-table-column(prop="email" label="电子邮件" align="center" width="150px")
</template>

<script type="text/ecmascript-6">
    import {AdminCacheKey, TeacherURL, ToolButtonList} from '../../config.toml'

    export default {
        name: 'kalix-admin-teacher',
        data() {
            return {
                dictDefine: [{ // 定义数据字典的显示
                    cacheKey: AdminCacheKey,
                    type: '性别',
                    targetField: 'sexName',
                    sourceField: 'sex'
                }, {
                    cacheKey: AdminCacheKey,
                    type: '职称',
                    targetField: 'positionalTitlesName',
                    sourceField: 'positionalTitles'
                }, {
                    cacheKey: AdminCacheKey,
                    type: '岗位名称',
                    targetField: 'positionName',
                    sourceField: 'position'
                }],
                btnList: ToolButtonList,
                targetURL: TeacherURL,
                bizDialog: [
                    {id: 'view', dialog: 'AdminTeacherView'},
                    {id: 'edit', dialog: 'AdminTeacherAdd'},
                    {id: 'add', dialog: 'AdminTeacherAdd'}
                ],
                isFixedColumn: true
            }
        },
        components: {},
        activated() {
        },
        deactivated() {
        }
    }
</script>

<style scoped lang="stylus">
</style>
